<!DOCTYPE html>
<html>
<!-- head -->
{include file="common/page/head"}
<body>
<!---------------- 修改优惠券 ------------------->

<!-- 页头 -->
{include file="common/page/header"}
<!-- jsfiles -->
{include file="common/page/jsfiles"}
<!-- 主体 -->
<div class="content container-fluid{if $leftBarScale eq '1'} scale{/if}">
    <div class="row">
        <div class="col-md-2 left-section">
            <!-- 左导航菜单 -->
            {include file="common/page/menu"}

        </div>
        <div class="col-md-10 right-section">
            <!--内容区域-->
            <h3><i class="icon iconfont">{$Think.session.currentMenu.icon}</i>优惠券编辑</h3>
            <div class="inner-section row">
                <div class="items add-div">
                    <form id="myForm" action="#" method="post" enctype="multipart/form-data">
                        <div class="item table-responsive">
                            <table class="table table-striped table-hover table-bordered table-base">
                                <tbody>
                                     <tr>
                                        <td>优惠券名称<label class="must-tag">*</label></td>
                                        <td>
                                            <input type="text" name="name" id="name" value="{$couponInfo.name}">
                                        </td>
                                        <td></td>
                                    </tr>
                                     
                                     <tr>
                                        <td>所属商城<label class="must-tag">*</label></td>
                                        <td>
                                            <label class="radio-inline">
                                                <input type="radio" class="coupon-type" name="type" value="1" {if $couponInfo.type eq '1'}checked{/if} > 拼团商城
                                            </label>
                                            <label class="radio-inline">
                                                <input type="radio" class="coupon-type" name="type" value="2" {if $couponInfo.type eq '2'}checked{/if}> 秒杀商城
                                            </label> 
                                            <label class="radio-inline">
                                                <input type="radio" class="coupon-type" name="type" value="3" {if $couponInfo.type eq '3'}checked{/if}> 百货商城
                                            </label>                                 
                                        </td>
                                        <td></td>
                                    </tr>
                                    
                                   
                                    <tr class="type-1" {if $couponInfo.type neq '1'}style="display:none;"{/if}>
                                        <td>优惠券面额<label class="must-tag">*</label></td>
                                        <td>
                                           <input type="text" name="value" id="value" placeholder="形如：50" value="{$couponInfo.value}">元
                                        </td>
                                        <td></td>
                                    </tr>
                                    <tr class="type-1" {if $couponInfo.type neq '1'}style="display:none;"{/if}>
                                        <td>使用条件<label class="must-tag">*</label></td>
                                        <td>
                                            <input type="text" name="condition_value" id="condition_value" value="{$couponInfo.condition_value}" placeholder="满多少元时才能使用，如10">元
                                        </td>
                                        <td></td>
                                    </tr>
                                   
                                    
                                    <tr>
                                        <td>单用户领取上限<label class="must-tag">*</label></td>
                                        <td>
                                            <input type="text"  name="user_limit" id="user_limit" value="{$couponInfo.user_limit}">
                                        </td>
                                        <td></td>
                                    </tr>

                                    <tr>
                                        <td>简单描述<label class="must-tag">*</label></td>
                                        <td>
                                            <input type="text"  name="description" id="description" value="{$couponInfo.description}">
                                        </td>
                                        <td></td>
                                    </tr>
                                    
                                    <tr>
                                        <td>已领取<label class="must-tag">&nbsp;&nbsp;</label></td>
                                        <td>

                                            {$couponInfo.get_quantity}
                                        </td>
                                        <td></td>
                                    </tr>

                                     <tr>
                                         <td>剩余数量<label class="must-tag">*</label></td>
                                         <td>
                                             <input type="text"  name="spare_quantity" id="spare_quantity" value="{$couponInfo.spare_quantity}">
                                         </td>
                                         <td></td>
                                     </tr>
                                    
                                     <tr>
                                         <td>优惠券生效日期<label class="must-tag">*</label></td>
                                         <td>
                                             <input type="text"  name="valid_start" id="valid_start" value="{$couponInfo.valid_start}" class="input-normal search Wdate" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',minDate:'%y-%M-%d'})">
                                         </td>
                                         <td></td>
                                     </tr>
                                     <tr>
                                         <td>优惠券失效时间<label class="must-tag">*</label></td>
                                         <td>
                                             <input type="text"  name="valid_end" id="valid_end" value="{$couponInfo.valid_end}" class="input-normal search Wdate" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',minDate:'%y-%M-%d'})">
                                         </td>
                                         <td></td>
                                     </tr>
									<tr class="hidden">
                                        <td>优惠券兑换积分值<label class="must-tag">*</label></td>
                                        <td>
                                            <input type="text" name="points" id="points" value="{$couponInfo.points}" placeholder="兑换积分值, 填此项后只能在积分商城兑换">
                                        </td>
                                        <td></td>
                                    </tr>
                                     <tr>
                                         <td>优惠券状态<label class="must-tag">*</label></td>
                                         <td>
                                             <label class="radio-inline">
                                                 <input type="radio"  name="is_use" value="1" {if $couponInfo.is_use eq 1}checked{/if}> 启用
                                             </label>
                                             <label class="radio-inline">
                                                 <input type="radio" name="is_use" value="0" {if $couponInfo.is_use eq 0}checked{/if}> 停用
                                             </label>
                                         </td>
                                         <td></td>
                                     </tr>
                                    
                                    <tr>
                                         <td>使用须知<label class="must-tag">*</label></td>
                                         <td>
                                             <textarea name="notice" id="notice" rows="4">{$couponInfo.notice}</textarea>
                                         </td>
                                         <td></td>
                                    </tr>
                                    <tr>
                                        <td>
                                        </td>
                                        <td>
                                         <input type="hidden" name="id" value="{$couponInfo.id}">
                                            <a class="btn btn-primary submit">提交</a>
                                            <a href="javascript:window.history.go(-1);" class="btn btn-default">返回</a>
                                        </td>
                                        <td></td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>

<!-- 页脚 -->
{include file="common/page/footer"}
<script src="__static__/js/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="__static__/js/jscolor/jscolor.js"></script>
<script type="text/javascript" src="__static__/js/form/jquery.form.js"></script>
<script type="text/javascript" src="__static__/js/form/jquery.validate.js"></script>
<script type="text/javascript" src="__static__/js/form/jquery.validate.extend.js"></script>
<script type="text/javascript" src="__app__/admin/view/Coupon/editCoupon/editCoupon.js"></script>
</body>
</html>